package android.medicalcloud.com.yiapp.yilian.configer.enums;

/**
 * Created by yinshilin on 16-12-3.
 */
public enum CaseStatus {
    ALL(0, "全部"),
    WAITTOTAKE(101, "待分诊"),
    WAITTORECIEVE(201, "待接收"),
    WAITTOSUBMIT(100, "草稿"),
    WAITTOCONFIRM(301, "待确认"),
    COMPELE(401, "已完成"),
    RETURNED(501, "已退回"),;
    public int status;
    public String text;

    CaseStatus(int status, String text) {
        this.status = status;
        this.text = text;
    }

    public static CaseStatus getStatusByStatusCode(int status) {
        switch (status) {
            case 0:
                return ALL;
            case 101:
                return WAITTOTAKE;
            case 201:
                return WAITTORECIEVE;
            case 100:
                return WAITTOSUBMIT;
            case 301:
                return WAITTOCONFIRM;
            case 401:
                return COMPELE;
            case 501:
                return RETURNED;
        }
        return ALL;
    }

}
